import Vue from 'vue'
import VueRouter from 'vue-router'
const login = () => import('@/views/login')
const home = () => import('@/views/home/index')

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: ' /home' },
  { path: '/home', component: home },
  { path: '/login', component: login }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
